//
//  TLSliderView.h
//  TLAVPlayer
//
//  Created by Tianlong on 2017/6/29.
//  Copyright © 2017年 Tianlong. All rights reserved.
//

#import <UIKit/UIKit.h>

@class TLAVPlayerSlider;
@protocol TLAVPlayerSliderDelegate <NSObject>
@optional

/**
 开始拖拽
 @param curTime 当前的播放时间
 */
- (void)tlAVPlayerSlider:(TLAVPlayerSlider *)slider beiginDraggingForCurTime:(float)curTime;
/**
 结束拖拽
 @param curTime 传递当前的拖拽的比例，来跳转时间
 */
- (void)tlAVPlayerSlider:(TLAVPlayerSlider *)slider endDraggingForCurTime:(float)curTime scale:(float)scale;
/**
 拖拽中
 @param scale 拖拽位置所占的比例
 */
- (void)tlAVPlayerSlider:(TLAVPlayerSlider *)slider didDraggingForScale:(float)scale;
@end

@interface TLAVPlayerSlider : UIView

@property (nonatomic, weak) id<TLAVPlayerSliderDelegate> delegate;

/** 最大时长或者最大值  */
@property (nonatomic, assign) float amountTime;
/** 设置当前值 */
@property (nonatomic, assign) float curTime;
/** 设置缓冲值 */
@property (nonatomic, assign) float bufferTime;

/** 正在拖拽 */
@property (nonatomic , assign) BOOL dragging;

/** 播放背景颜色 */
@property (nonatomic, strong) UIColor *playProgressBackgoundColor;
/** 缓存条背景颜色 */
@property (nonatomic, strong) UIColor *trackBackgoundColor;
/** 整个bar背景颜色 */
@property (nonatomic, strong) UIColor *progressBackgoundColor;

@end

